#include<iostream>
using namespace std;
const int N = 110;
int st[N][N];
int a[N];
int n;
int main()
{
	cin >> n;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
		st[i][i] = 1;
	}
	for (int i = 1; i <= n; i++) {
		int d;
		cin >> d;
		if (i - d >= 1)st[i][i - d] = 1;
		if (i + d <= n)st[i][i + d] = 1;
	}
	for (int k = 1; k <= n; k++) {
		for (int i = 1; i <= n; i++) {
			for (int j = 1; j <= n; j++) {
				st[i][j] |= (st[i][k] & st[k][j]) | (st[i][k] & st[j][k]);
			}
		}
	}
	for (int i = 1; i <= n; i++) {
		if (!st[i][a[i]]) {
			cout << "NO" << endl;
			return 0;
		}
	}
	cout << "YES" << endl;
	return 0;
}